import orders.Orders

class BootStrap {

    def init = { servletContext ->
        Orders o1 = new Orders()
        o1.buyerName="Juanito agonia"
        o1.adress="La letra"
        o1.cherry = 500
        o1.genuineMagohany=345
        o1.curlyMaple = 333
        o1.sawDust = 15
        o1.calculateDeliveryTime()
        o1.calculatePrice()
        
        Orders o2 = new Orders()
        o2.buyerName="Juana banana morgana"
        o2.adress="av. Siempre viva 123 casa 23"
        o2.cherry = 456
        o2.genuineMagohany=2
        o2.curlyMaple = 186
        //o2.sawDust = 5
        o2.wenge= 466
        o2.calculateDeliveryTime()
        o2.calculatePrice()
        
        Orders o3 = new Orders()
        o3.buyerName="Chemical Brothers"
        o3.adress="Triplandia av espctador 1245"
        o3.cherry = 500
        o3.genuineMagohany=345
        o3.curlyMaple = 191
        o3.sawDust = 15
        o3.whiteOak =212
        o3.calculateDeliveryTime()
        o3.calculatePrice()
        
        
        Orders o4 = new Orders()
        o4.buyerName="Castores cascarrabias"
        o4.adress="5 presa-castor en rio bogota"
        o4.cherry = 345
        o4.genuineMagohany=12
        o4.curlyMaple = 190
        o4.sawDust = 248
        o4.calculateDeliveryTime()
        o4.calculatePrice()
        
        Orders o5 = new Orders()
        o5.buyerName="Lumberjack 001"
        o5.adress="Bosque talado 435 -  casa 195"
        o5.cherry = 65
        o5.genuineMagohany=879
        o5.curlyMaple = 235
        //o5.sawDust = 15
        o5.whiteOak =875
        o5.calculateDeliveryTime()
        o5.calculatePrice()
        
        Orders ce = new Orders()
        ce.buyerName="Buyer Example"
        ce.adress="La casa del Comprador"
        ce.cherry = 65
        ce.wenge=250
        ce.whiteOak = 1
        ce.calculateDeliveryTime()
        ce.calculatePrice()
     
        o1.save()
        o2.save()
        o3.save()
        o4.save()
        o5.save()
        ce.save()
    }
    def destroy = {
    }
}
